pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let mut str_iter = num_str.split('(');
    let from = str_iter.next().unwrap();
    let from_base = str_iter.next().unwrap();
    let from_base: u32 = from_base[..from_base.len() - 1].parse().unwrap();
    let x = u32::from_str_radix(from, from_base).unwrap();
    fn output(x: u32, to_base: u32) -> String {
        let ch = char::from_digit(x % to_base, to_base).unwrap();
        if x >= to_base {
            output(x / to_base, to_base) + &ch.to_string()
        } else {
            ch.to_string()
        }
    }
    output(x, to_base)
}
